<template>
  <div class="first-funTwo-container">
    <div class="first-funTwo-box">
      <div class="first-funTwo-button">
        <div
          v-for="(item, index) in buttonList"
          :key="index"
          @click="clickFunBtn(index)"
        >
          <div
            class="first-funTwo-button-default"
            :class="item.active ? 'first-funTwo-button-active' : ''"
          >
            <div class="first-funTwo-button-text">
              {{ item.name }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      buttonStatus: false,
      buttonList: [
        { name: "管理", active: true },
        { name: "分析", active: false },
        { name: "分析", active: false },
        { name: "设计", active: false },
        { name: "数据", active: false },
        { name: "专业", active: false }
      ]
    };
  },
  created() {},
  mounted() {},
  computed: {},
  methods: {
    clickFunBtn(index) {
      this.buttonList.map((item) => {
        item.active = false;
        this.buttonList[index].active = true;
      });
    }
  },
  watch: {}
};
</script>

<style lang="scss">
.first-funTwo-container {
  width: 100%;
  height: 100%;
  .first-funTwo-box {
    height: 100%;
    // background: url('../../../assets/img/FunctionArea/first_fun_two.png')
    // no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    .first-funTwo-button {
      width: 120px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      height: 100%;
      .first-funTwo-button-default {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        width: 100%;
        height: 160px;
        background: url("../../../assets/img/FunctionArea/first_fun_two_default.png")
          no-repeat;
        font-size: 18px;
        color: #227daf;
        .first-funTwo-button-text {
          position: absolute;
          bottom: 30px;
        }
      }
      .first-funTwo-button-active {
        background: url("../../../assets/img/FunctionArea/first_fun_two_active.png")
          no-repeat;
        color: #1fa398;
      }
    }
  }
}
</style>
